<?php
namespace api\zhengmao\controller;
use api\zhengmao\model\BannerModel;
use api\zhengmao\model\NavModel;
use cmf\controller\RestBaseController;

class HomeController extends RestBaseController
{
    public function banner()
    {
        $data = BannerModel::select();
        if($data){
            return success('查询成功',$data);
        }
        return error('查询失败');
    }
    public function nav()
    {
        $data = NavModel::select();
        if($data){
            return success('查询成功',$data);
        }
        return error('查询失败');
    }
}